package com.sy.simpleegg.ui.dialog

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.DialogFragment
import androidx.recyclerview.widget.LinearLayoutManager
import com.sy.simpleegg.adapter.ClearCoinDataAdapter
import com.sy.simpleegg.bean.ClearDataBean
import com.sy.simpleegg.databinding.FragmentDialogClearBinding

class ClearCoinDataDialogFragment(private val datas: MutableList<ClearDataBean>): DialogFragment() {
    override fun onCreateView(
        inflater: LayoutInflater,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View? {
        val binding = FragmentDialogClearBinding.inflate(inflater, container, false)
        binding.rvClearData.layoutManager = LinearLayoutManager(requireContext())
        binding.rvClearData.adapter = ClearCoinDataAdapter(datas)
        binding.btnClose.setOnClickListener {
            dismissAllowingStateLoss()
        }
        return binding.root
    }
}